$(function () {
    $(".square-option").click(function () {
        $(this).addClass("checkchaneg").siblings().removeClass("checkchaneg");
    })

    $(".option").click(function () {
        $(this).css("color", "#ff6b00").siblings().css("color", "#000")
    })

    // 页面跳转
    $(".source-list-container .class-show .iget-ui-col").click(function () {
        window.location.href = "../course.html"
    })
    $(".source-list-container .book-show .iget-ui-col").click(function () {
        window.location.href = "../book.html"
    })

    // 图标跳转
    $(".home-header-logo ").click(function () {
        window.location.href = "../index.html"
    })

    // 课程和电子书
    $(".iget-category .filter-options-container .filter-options .filter-option").click(function () {
        let index = $(this).index();
        switch (index) {
            case 0:
                $(".source-list-container .class-show").show().siblings(".book-show").show();
                break;
            case 1:
                $(".source-list-container .class-show").show().siblings(".book-show").hide();
                break;
            case 2:
                $(".source-list-container .book-show").show().siblings(".class-show").hide();
                break;
        }
    })
})


